/**
 * Copyright &copy; 2012-2017 <a href="https://vivo.com">vivo</a> All rights reserved.
 */
package com.vivo.employee.entity;

import com.thinkgem.jeesite.modules.sys.entity.Office;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 培训经历Entity
 * @author jyangye
 * @version 2018-01-06
 */
public class ViEmpTrain extends DataEntity<ViEmpTrain> {
	
	private static final long serialVersionUID = 1L;
	private String employeeId;		// 员工ID

    private Office comp;
    private Office dept;
    private Office post;

	private String name;		// 姓名
	private String code;		// 身份证号
	private String trainCode;		// 培训编号
	private String theme;		// 培训主题
	private String teacher;		// 培训老师
	private String trainType;		// 培训形式
	private Date beginDate;		// 开始日期
	private Date endDate;		// 结束日期
	private String trainTime;		// 培训时长
	private String trainScore;		// 培训成绩
	
	public ViEmpTrain() {
		super();
	}

	public ViEmpTrain(String id){
		super(id);
	}

	public String getEmployeeId() {
		return employeeId;
	}

	public void setEmployeeId(String employeeId) {
		this.employeeId = employeeId;
	}

    @ExcelField(title="组织机构", align=2, sort=30)
    public Office getComp() {
        return comp;
    }

    public void setComp(Office comp) {
        this.comp = comp;
    }

    @ExcelField(title="部门", align=2, sort=40)
    public Office getDept() {
        return dept;
    }

    public void setDept(Office dept) {
        this.dept = dept;
    }

    @ExcelField(title="岗位", align=2, sort=50)
    public Office getPost() {
        return post;
    }

    public void setPost(Office post) {
        this.post = post;
    }

	
	@Length(min=1, max=64, message="姓名长度必须介于 1 和 64 之间")
	@ExcelField(title="姓名", align=2, sort=60)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=1, max=64, message="身份证号长度必须介于 1 和 64 之间")
	@ExcelField(title="*身份证号", align=2, sort=70, isText = true)
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	@Length(min=0, max=64, message="培训编号长度必须介于 0 和 64 之间")
	@ExcelField(title="培训编号", align=2, sort=80)
	public String getTrainCode() {
		return trainCode;
	}

	public void setTrainCode(String trainCode) {
		this.trainCode = trainCode;
	}
	
	@Length(min=0, max=64, message="培训主题长度必须介于 0 和 64 之间")
	@ExcelField(title="*培训主题", align=2, sort=90)
	public String getTheme() {
		return theme;
	}

	public void setTheme(String theme) {
		this.theme = theme;
	}
	
	@Length(min=0, max=64, message="培训老师长度必须介于 0 和 64 之间")
	@ExcelField(title="*培训老师", align=2, sort=100)
	public String getTeacher() {
		return teacher;
	}

	public void setTeacher(String teacher) {
		this.teacher = teacher;
	}
	
	@Length(min=1, max=32, message="培训形式长度必须介于 1 和 32 之间")
	@ExcelField(title="*培训形式", align=2, sort=110)
	public String getTrainType() {
		return trainType;
	}

	public void setTrainType(String trainType) {
		this.trainType = trainType;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd")
	@NotNull(message="开始日期不能为空")
	@ExcelField(title="*开始日期", align=2, sort=120)
	public Date getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd")
	@NotNull(message="结束日期不能为空")
	@ExcelField(title="*结束日期", align=2, sort=130)
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	@Length(min=0, max=32, message="培训时长长度必须介于 0 和 32 之间")
	@ExcelField(title="*培训时长", align=2, sort=140)
	public String getTrainTime() {
		return trainTime;
	}

	public void setTrainTime(String trainTime) {
		this.trainTime = trainTime;
	}
	
	@Length(min=0, max=11, message="培训成绩长度必须介于 0 和 11 之间")
	@ExcelField(title="*培训成绩", align=2, sort=150)
	public String getTrainScore() {
		return trainScore;
	}

	public void setTrainScore(String trainScore) {
		this.trainScore = trainScore;
	}
	
}